<include file="Public/newset-header" title="应用合并" />
<link rel="stylesheet" href="__STATIC__/css/add.css">
<link rel="stylesheet" href="__STATIC__/css/cropper.min.css">
<link rel="stylesheet" href="__STATIC__/css/sitelogo.css">
<style type="text/css">
	.avatar-btns button{height: 35px;}
</style>
<div class="hint-copy">
	<p><i class="fa fa-warning"></i>已成功复制链接,请直接粘贴.</p>
</div>
<div class="modal fade" id="selApp" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title" id="myModalLabel">选择 App</h4>
			</div>
			<div class="modal-body">
				<div class="tabbb_box">
					<form action="{:U('Index/myhebing_act')}" method="post" id="myappform">
						<input type="hidden" name="appid" value="{$info.id}">
						<table style="width:100%;"  class="table table-striped table-hover text-center myapps my_history pgy-table">
							<thead>
							<tr>
								<th class="text-center" width="10%">&nbsp; </th>
								<th class="text-center" width="30%">图标</th>
								<th class="text-center" width="30%">名称</th>
								<th class="text-center" width="30%">平台</th>
							</tr>
							</thead>

							<tbody>
							<foreach name="list" item="v" key="k">
								<tr>
									<td class="clickable"><input type="checkbox" name="hobby[]"  id="hobby" value="{$v.id}" {$v.checkstr} /></td>
									<!--<td class="clickable"><input type="checkbox" name="hobby" value="{$v.id}" {$v.checkstr} /></td>-->
									<td class="clickable">
										<if condition="$v.zxlogo neq '' ">
											<img src="__IMG__{$v.zxlogo}" class="img-rounded" width="28" height="28" />
											<else />
											<img src="
../../../Public/icon/dafuapk.png" class="img-rounded" width="28" height="28" />
										</if>

									</td>
									<td class="clickable">&nbsp;&nbsp;{$v.nickname}</td>
									<td class="clickable text-center">
										<if condition="$v.ext eq 'ipa' ">
											<span class="label label-info">IOS</span>
											<else />
											<span class="label label-success">Android</span>
										</if>

									</td>

								</tr>
							</foreach>
							</tbody>
						</table>
					</form>
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="page btn-u" data-dismiss="modal" onclick="hebingsave()">合并应用</button>
			</div>

		</div>
	</div>
</div>
<div class="container" style="padding-bottom:40px;">
	<ul class="breadcrumb">
		<li><a href="{:U('Index/index')}">首页</a></li>
		<li><a href="{:U('Index/index')}">上传应用</a></li>
		<li class="active">应用设置</li>
	</ul>
	<div class="app-set row" style="position:relative;">
		<div class="app-left col-sm-6 col-lg-2">
			<div class="app-left-icon text-right">
				<if condition="$info.zxlogo neq '' ">
					<img src="__IMG__{$info.zxlogo}" alt="" class="app-icon"/>
					<else />
					<img src="../../../Public/icon/dafuapk.png" alt="" class="app-icon"  />
				</if>
				<!--<button type="button" class="btn btn-primary btn-sm"  data-toggle="modal" data-target="#avatar-modal">修改头像</button>-->
				<div class="clear"></div>
			</div>
		</div>
		<div class="col-xs-12 col-lg-6">
			<div class="adjust-box">
				<div class="app-tag">
					<span id="generalize-url">zjchcf.com/a/{$info.shorturl}</span>
					<i id="copyBT" class="fa fa-copy"></i>
					<span>Android</span>
					<span>PackageName<b>com.huoyun.app</b></span>
				</div>
				<div class="app-nav">
					<ul>
						<li><a href="{:U('Index/modify',array('id'=>$info['id']))}"><i class="fa fa-file"></i>基本信息</a></li>
						<li class="on"><a href="javascript:;"><i class="fa fa-cubes"></i>应用合并</a></li>
						<li><a href="{:U('Index/appinfo',array('id'=>$info['id']))}"><i class="fa fa-bar-chart"></i>高级统计</a></li>
						<li><a href="{:U('UrlAnalysis/index')}"><i class="fa fa-paper-plane"></i>应用推广</a></li>
					</ul>
				</div>
			</div>
		</div>
		<div class="col-xs-6 col-lg-4 app-set-abs">
			<div class="app-btns">
				<a href="" class="on" style="margin-bottom:10px;"><i class="fa fa-cloud-upload"></i>上传新版本</a>
				<a href="/a/{$info.shorturl}" target="_blank" ><i class="fa fa-eye"></i>预览</a>
			</div>
		</div>
		<div class="modal fade" id="avatar-modal" aria-hidden="true" aria-labelledby="avatar-modal-label" role="dialog" tabindex="-1">
			<div class="modal-dialog modal-lg">
				<div class="modal-content">
					<form class="avatar-form">
						<div class="modal-header">
							<button class="close" data-dismiss="modal" type="button">&times;</button>
							<h4 class="modal-title" id="avatar-modal-label">上传图片</h4>
						</div>
						<div class="modal-body">
							<div class="avatar-body">
								<div class="avatar-upload">
									<input class="avatar-src" name="avatar_src" type="hidden">
									<input class="avatar-data" name="avatar_data" type="hidden">
									<label for="avatarInput" style="line-height: 35px;">图片上传</label>
									<button class="btn btn-danger"  type="button" style="height: 35px;" onclick="$('input[id=avatarInput]').click();">请选择图片</button>
									<span id="avatar-name"></span>
									<input class="avatar-input hide" id="avatarInput" name="avatar_file" type="file"></div>
								<div class="row">
									<div class="col-md-9">
										<div class="avatar-wrapper"></div>
									</div>
									<div class="col-md-3">
										<div class="avatar-preview preview-lg" id="imageHead"></div>
									</div>
								</div>
								<div class="row avatar-btns">
									<div class="col-md-4">
										<div class="btn-group">
											<button class="btn btn-danger fa fa-undo" data-method="rotate" data-option="-90" type="button" title="Rotate -90 degrees"> 向左旋转</button>
										</div>
										<div class="btn-group">
											<button class="btn  btn-danger fa fa-repeat" data-method="rotate" data-option="90" type="button" title="Rotate 90 degrees"> 向右旋转</button>
										</div>
									</div>
									<div class="col-md-5" style="text-align: right;">
										<button class="btn btn-danger fa fa-arrows" data-method="setDragMode" data-option="move" type="button" title="移动">
                                                <span class="docs-tooltip" data-toggle="tooltip" title="" data-original-title="$().cropper(&quot;setDragMode&quot;, &quot;move&quot;)">
                                                </span>
										</button>
										<button type="button" class="btn btn-danger fa fa-search-plus" data-method="zoom" data-option="0.1" title="放大图片">
                                                <span class="docs-tooltip" data-toggle="tooltip" title="" data-original-title="$().cropper(&quot;zoom&quot;, 0.1)">
                                                </span>
										</button>
										<button type="button" class="btn btn-danger fa fa-search-minus" data-method="zoom" data-option="-0.1" title="缩小图片">
                                                <span class="docs-tooltip" data-toggle="tooltip" title="" data-original-title="$().cropper(&quot;zoom&quot;, -0.1)">
                                                </span>
										</button>
										<button type="button" class="btn btn-danger fa fa-refresh" data-method="reset" title="重置图片">
											<span class="docs-tooltip" data-toggle="tooltip" title="" data-original-title="$().cropper(&quot;reset&quot;)" aria-describedby="tooltip866214"></span>
										</button>
									</div>
									<div class="col-md-3">
										<button class="btn btn-danger btn-block avatar-save fa fa-save" type="button" data-dismiss="modal"> 保存修改</button>
									</div>
								</div>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
	<div class="merge row">
		<div class="col-md-8 col-md-offset-2 merge-border">
			<div class="merge50 row">
				<div class="col-md-5 merge-message text-center">
					<a href="" class="merge-icon">
						<if condition="$info.zxlogo neq '' ">
							<img src="__IMG__{$info.zxlogo}" alt="" class="app-icon"/>
							<else />
							<img src="../../../Public/icon/dafuapk.png" alt="" class="app-icon"  />
						</if>
					</a>
					<p>{$info.nickname}</p>
					<!-- 安卓标签样式 -->
					<if condition="$info.ext eq 'apk'">
						<p><span class="android-tag">Android</span></p>
						<else/>
						<p><span class="android-tag">IOS</span></p>
					</if>


				</div>
				<div class="col-md-2 link-icon text-center">
					<i class="fa fa-link"></i>

				</div>

				<div class="col-md-5 text-center">
					<a href="javascript:void(0)"  onclick="openSelApp()" onmouseover="$('#add-merge').attr('src','__STATIC__/images/app_add_hover.png')" onmouseout="$('#add-merge').attr('src','__STATIC__/images/app_add.png')">
						<div class="text-center" style="margin:auto;width:120px;height:120px;">
							<if condition="$listtow neq ''">
								<if condition="$listtow.zxlogo neq '' ">
									<img src="__IMG__{$listtow.zxlogo}" class="img-rounded" width="119" height="118" />
									<else />
									<img src="data:image/png;base64,{$listtow.hslogo}" class="img-rounded" width="119" height="118" />
								</if>
								<else/>
								<img src="__STATIC__/images/app_add.png" id="add-merge">
							</if>

						</div>
					</a>
					<if condition="$listtow neq ''">
						<p class="text-center app-name">{$listtow.nickname}</p>
						<if condition="$listtow.ext eq 'apk'">
							<p><span class="android-tag">Android</span></p>
							<else/>
							<p><span class="android-tag">IOS</span></p>
						</if>
						<else/>
						<p class="text-center app-name">选择需要合并的应用</p>
					</if>


						<form action="{:U('Index/myhebing_act')}" method="post" id="formjie">
							<input type="hidden" name="appid" value="{$info.id}">
							<a onclick="jiebang();"> 解绑</a>

						</form>

				</div>
			</div>
			<hr style="height:1px;border:none;border-top:1px dotted #ccc;width:90%;margin:auto;">
			<div class="row merge50">
				<div class="col-md-10 col-md-offset-1">
					<p style="margin-bottom:15px;">温馨提示</p>
					<p>合并后的两个应用，进入任一个应用的单页，扫描二维码，会根据你的手机系统自动帮你下载相应的版本。</p>
				</div>
			</div>
		</div>
	</div>
</div>
<include file="Public/newset-footer" />
<script src="__STATIC__/js/imgUp.js"></script>
<!-- 文件上传的js -->
<script type="text/javascript" src="__STATIC__/js/plupload.full.min.js" ></script>
<!-- 七牛云存储 -->
<script type="text/javascript" src="__STATIC__/js/qiniu.min.js" ></script>
<!-- 暂时未知,疑似获取安装包信息的插件 -->
<script type="text/javascript" src="__STATIC__/js/infozaq.js"></script>
<script language="javascript">
    function openSelApp() {
        $('#selApp').modal('show');

    }
    function hebingsave(){
        $('#myappform').submit();
    }

    function jiebang(){
        $('#formjie').submit();
	}
</script>
